'use strict';

const { Controller } = require('ee-core');
const Log = require('ee-core/log');
const Services = require('ee-core/services');
const { BrowserWindow } = require('electron')
const { app } = require('electron')
const CoreElectronWindow = require('ee-core/electron/window');
const path = require("path");
const fs = require("fs");

const winURL = !app.isPackaged
    ? `http://localhost:8080` // 开发路径
    : `file://${__dirname}/index.html` //生产路径

/**
 * example
 * @class
 */
class SettingController extends Controller {

  constructor(ctx) {
    super(ctx);
  }

  async getSettingConfig () {
    const configFilePath = path.join(process.cwd(), './electron/config/config.json');
    console.log(configFilePath)
    let config = fs.readFileSync(configFilePath, {encoding: 'utf-8'});
    config = JSON.parse(config)
    return config
  }
}

SettingController.toString = () => '[class SettingController]';
module.exports = SettingController;